Page({
  data: {
    xh: ''
  },
  onLoad: function (e) {
    var xh = wx.getStorageSync("xh");
    this.setData({
      xh
    })
  },
  onShareAppMessage: function () {
    return {
      title: "邀您体验",
      desc: "「工程课表」提供工程职院在校生师生课表等查询服务。",
      path: "/pages/index/index"
    }
  },
  guize: function () {
    wx.navigateTo({
      url: "../../more/help"
    })
  },
  xhInput: function (t) {
    this.data.xh = t.detail.value
  },
  setxh: function () {
    this.data.xh.length < 9 ? wx.showModal({
      content: "请提交正确的学号！",
      showCancel: !1
    }) : (wx.setStorageSync("xh", this.data.xh), wx.showToast({
      title: "设置成功",
      icon: "success"
    }), wx.reLaunch({
      url: "/pages/index/index"
    }))
  }
})